<!doctype html>
<html lang="">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" href="/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Vite App</title>
    <style></style>
  </head>
  <body>
    <button>点我</button>
    <div>鼠标移入</div>
    <input type="text" />
    <script>
      const btn = document.querySelector('button')
      btn.addEventListener('mouseenter', (e) => {
        input.value = 'arkts arkui'
      })

      const div = document.querySelector('div')
      div.addEventListener('mouseenter', () => {
        console.log('div mouseenter')
      })

      const input = document.querySelector('input')
      /* input.focus() */
      /*  input.addEventListener('blur', (e) => {
        alert(e.target.value)
      }) */
      input.addEventListener('keyup', (e) => {
        if (e.key === 'Enter') {
          alert('我回车了' + e.target.value)
        }
      })
    </script>
  </body>
</html>
